Case Sensitivity
AppleScript is not case sensitive; when it interprets statements in a script, it does not distinguish uppercase from lowercase letters. This is true for all elements of the language.The one exception to this rule is string comparisons. Normally, AppleScript does not distinguish uppercase from lowercase letters when comparing strings, but if you want AppleScript to consider case, you can use a special statement called a Considering statement. For more information, see "Considering and Ignoring Statements" on page 213.
Most of the examples in this chapter and throughout this guide are in lowercase letters. Sometimes words are capitalized to improve readability. For example, in the following variable assignment, the "N" in
myName
is capitalized to make it easier to see that two words have been combined to form the name of the variable.
set myName to "Pegi"After you create the variablemyName
, you can refer to it by any of these names:
MYNAME myname MyName mYNameWhen interpreting strings, such as"Pegi"
, AppleScript preserves the case of the letters in the string, but does not use it in comparisons. For example, the value of the variablemyName
defined earlier is always"Pegi"
, but the value of the expressionmyName = "PEGI"
istrue
.